<div class="dux-tools">
  <div class="bread-head">管理组管理 <span class="small">管理员分组管理</span> </div>
  <br>
  <div class="tools-function clearfix">
    <div class="float-left"> <a class="button button-small bg-main icon-list" href="__URL__"> 管理组列表</a> </div>
    <?php if(model('user_group')->model_power('user','add')){ ?>
    <div class="button-group float-right"> <a class="button button-small bg-dot icon-plus dropdown-toggle"> 添加管理组 <span class="downward"></span></a>
      <ul class="drop-menu pull-right">
        <li><a href="__URL__/add">添加管理组</a></li>
      </ul>
    </div>
    <?php } ?>
  </div>
</div>
<div class="admin-main"> 
  <!--管理员列表-->
  <div class="panel dux-box">
    <div class="table-responsive">
      <table id="table" class="table table-hover ">
        <tbody>
          <tr>
            <th width="80">编号</th>
            <th width="*">管理组名称</th>
            <th width="150">操作</th>
          </tr>
          <!--foreach:{$list $vo}-->
          <tr>
            <td><center>{$vo.id}</center></td>
            <td>{$vo.name}</td>
            <td><center>
            <?php if(model('user_group')->model_power('user_group','edit')){ ?>
            <a href="__URL__/edit/id-{$vo.id}" class="button bg-blue button-small icon-cog" title="设置"></a>
            <?php } ?>
           <?php if(model('user_group')->model_power('user_group','del')){ ?>
            &nbsp;&nbsp;<a class="button bg-red button-small icon-trash-o js-del" href="javascript:void(0);" onclick="del('{$vo.id}',this)" title="删除"></a>
            <?php } ?>
            </center></td>
          </tr>
          <!--{/foreach}-->
        </tbody>
      </table>
    </div>
  </div>
</div>
<script>
//删除
function del(id,obj) {
	var obj;
	ajaxpost({
		name:'删除此用户组会删除用户组下的用户！',
		url:"__URL__/del",
		data:{id: id},
		tip:1,
		success:function(){
			$(obj).parent().parent().remove();
		}
	});
}
</script>